package com.fieldchain.ex.fa100.custom.view;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.FrameLayout;

import com.fieldchain.ex.fa100.utils.share.ShareManager;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/6
 */
public class MyFramelayout extends FrameLayout{
    public MyFramelayout(@NonNull Context context) {
        super(context);
    }

    public MyFramelayout(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MyFramelayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        heightMeasureSpec = MeasureSpec.makeMeasureSpec(ShareManager.getInstance().getHeight(), MeasureSpec.EXACTLY);
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

}
